package com.zj.osm.entity.greendao;

import android.os.Parcel;
import android.os.Parcelable;

import org.greenrobot.greendao.annotation.Entity;
import org.greenrobot.greendao.annotation.Id;
import org.greenrobot.greendao.annotation.Index;
import org.greenrobot.greendao.annotation.Generated;

/**
 * 设备类 和点、线多对一
 *
 * @author jiang zhu on 2019/10/24
 */
@Entity
public class Equipment implements Parcelable {
    @Id(autoincrement = true)
    private Long id;
    //添加设备名称
    private String name;          //name='杆型（10kV）
    private String name_before;
    //设备角度
    private int angel;
    //设置改造后的角度
    private int angle_after;
    //设备的图标我去
    private String equpmentIcon;
    private String equpmentIcon_before;
    //杆头，杆型的ID
    private String lever_id;    //lever_id='10' 第一个moduTypeKey
    private String head_id;     // head_id='12' 第二个moduTypeId
    //杆头，杆型的ID
    private String lever_id_before;
    private String head_id_before;
    //值：都用模块类型key，建议字段改为ModuleTypeKey 目前是lever_id


    @Index(unique = true)
    private String equipmentId;

    //线的ID
    private Long lineId;
    //线的唯一ID
    private String lineCid;

    //点的ID
    private Long pointId;

    //模块的数量
    private int amount;
    //模块的数量
    private int amount_before;
    // name='杆型（10kV）'
    // 第一个moduName   //lever_id='10'第一个moduTypeId  // head_id='12' 第二个moduTypeId           第三个的内容  //  threeName='2Z-M-15双回直线水泥单杆杆型'        //module_code='2Z-M-15',   ModuleID='5' 第三个2Z-M-15双回直线水泥单杆杆型对应的moduleID

    //三级各个设备名称
    private String oneName;
    private String twoName;
    private String towName_before;
    private String  threeName;//杆型名称  2Z-M-15双回水泥杆塔。第三个的内容  //  threeName='2Z-M-15双回直线水泥单杆杆型'
    private String  threeName_before;//改造前的内容。
    private String fourName;
    //四级各个ID
    private String fourId;//杆高  //2020年5月6日 类型修改
    private String fourId_before;//杆高  //2020年5月6日 类型修改

    //三级各个设备ID
    private String oneId;
    private String twoId;
    private String threeId;
    private String threeId_before;
    private String shaoJing;//[fourName]
    //区分线还是点  0 是杆型 1.  8附属设施  9水泥制品
    private int qubie;
    //添加设备备注信息
    private String note;
    //线设备名称
    private String lineName;
    //Item_ID
    private Long projectId;
    //设备编号
    private String module_code;  //第三个 module_code='2Z-M-15',
    private String module_code_before;  //第三个 module_code='2Z-M-15',
    //去module查询的id
    private String ModuleID; //第三个的ModulID ModuleID='5'
    private String ModuleID_before; //第三个的ModulID ModuleID='5'
    //查询Icon和LegendTypeKey
    private String getModuleTypeID;
    //保存时候储存的信息
    private String ModuleTxt;
    //状态
    public String Statu;
    //状态
    public String Statu_before;
    //设备编号
    private String equpmentNumber;
    //设备编号
    private String equpmentNumber_after;
    ////条件
    //杆塔高度
    private String poleHeight;
    private String poleHeight_before;
    //强度等级
    private String strengthLevel;
    private String strengthLevel_before;

    //电压等级
    private String voltageLevel;
    private String voltageLevel_befo;
    //回路数
    private String loop;
    private String loop_before;
    //接地模块
    private String JdModleCode;
    //接地模块前
    private String JdModleCode_before;
    //电容器
    private String capacitance;
    private String capacitance_before;
    //是否成套化
    private String completeSet;
    private String completeSet_before;
    //杆型条件 【直线,直线转角,直线耐张,8（15）】
    private String rodType;
    private String rodType_before;

    //类别     【水泥杆,水泥双杆,窄基塔】
    private String rodCategory;
    private String rodCategory_before;
    @Generated(hash = 2002447229)
    public Equipment(Long id, String name, String name_before, int angel, int angle_after, String equpmentIcon, String equpmentIcon_before, String lever_id, String head_id, String lever_id_before,
            String head_id_before, String equipmentId, Long lineId, String lineCid, Long pointId, int amount, int amount_before, String oneName, String twoName, String towName_before, String threeName,
            String threeName_before, String fourName, String fourId, String fourId_before, String oneId, String twoId, String threeId, String threeId_before, String shaoJing, int qubie, String note,
            String lineName, Long projectId, String module_code, String module_code_before, String ModuleID, String ModuleID_before, String getModuleTypeID, String ModuleTxt, String Statu, String Statu_before,
            String equpmentNumber, String equpmentNumber_after, String poleHeight, String poleHeight_before, String strengthLevel, String strengthLevel_before, String voltageLevel, String voltageLevel_befo,
            String loop, String loop_before, String JdModleCode, String JdModleCode_before, String capacitance, String capacitance_before, String completeSet, String completeSet_before, String rodType,
            String rodType_before, String rodCategory, String rodCategory_before) {
        this.id = id;
        this.name = name;
        this.name_before = name_before;
        this.angel = angel;
        this.angle_after = angle_after;
        this.equpmentIcon = equpmentIcon;
        this.equpmentIcon_before = equpmentIcon_before;
        this.lever_id = lever_id;
        this.head_id = head_id;
        this.lever_id_before = lever_id_before;
        this.head_id_before = head_id_before;
        this.equipmentId = equipmentId;
        this.lineId = lineId;
        this.lineCid = lineCid;
        this.pointId = pointId;
        this.amount = amount;
        this.amount_before = amount_before;
        this.oneName = oneName;
        this.twoName = twoName;
        this.towName_before = towName_before;
        this.threeName = threeName;
        this.threeName_before = threeName_before;
        this.fourName = fourName;
        this.fourId = fourId;
        this.fourId_before = fourId_before;
        this.oneId = oneId;
        this.twoId = twoId;
        this.threeId = threeId;
        this.threeId_before = threeId_before;
        this.shaoJing = shaoJing;
        this.qubie = qubie;
        this.note = note;
        this.lineName = lineName;
        this.projectId = projectId;
        this.module_code = module_code;
        this.module_code_before = module_code_before;
        this.ModuleID = ModuleID;
        this.ModuleID_before = ModuleID_before;
        this.getModuleTypeID = getModuleTypeID;
        this.ModuleTxt = ModuleTxt;
        this.Statu = Statu;
        this.Statu_before = Statu_before;
        this.equpmentNumber = equpmentNumber;
        this.equpmentNumber_after = equpmentNumber_after;
        this.poleHeight = poleHeight;
        this.poleHeight_before = poleHeight_before;
        this.strengthLevel = strengthLevel;
        this.strengthLevel_before = strengthLevel_before;
        this.voltageLevel = voltageLevel;
        this.voltageLevel_befo = voltageLevel_befo;
        this.loop = loop;
        this.loop_before = loop_before;
        this.JdModleCode = JdModleCode;
        this.JdModleCode_before = JdModleCode_before;
        this.capacitance = capacitance;
        this.capacitance_before = capacitance_before;
        this.completeSet = completeSet;
        this.completeSet_before = completeSet_before;
        this.rodType = rodType;
        this.rodType_before = rodType_before;
        this.rodCategory = rodCategory;
        this.rodCategory_before = rodCategory_before;
    }
    @Generated(hash = 748305627)
    public Equipment() {
    }
    public Long getId() {
        return this.id;
    }
    public void setId(Long id) {
        this.id = id;
    }
    public String getName() {
        return this.name;
    }
    public void setName(String name) {
        this.name = name;
    }
    public String getLever_id() {
        return this.lever_id;
    }
    public void setLever_id(String lever_id) {
        this.lever_id = lever_id;
    }
    public String getHead_id() {
        return this.head_id;
    }
    public void setHead_id(String head_id) {
        this.head_id = head_id;
    }
    public String getEquipmentId() {
        return this.equipmentId;
    }
    public void setEquipmentId(String equipmentId) {
        this.equipmentId = equipmentId;
    }
    public Long getLineId() {
        return this.lineId;
    }
    public void setLineId(Long lineId) {
        this.lineId = lineId;
    }
    public Long getPointId() {
        return this.pointId;
    }
    public void setPointId(Long pointId) {
        this.pointId = pointId;
    }
    public int getAmount() {
        return this.amount;
    }
    public void setAmount(int amount) {
        this.amount = amount;
    }
    public String getOneName() {
        return this.oneName;
    }
    public void setOneName(String oneName) {
        this.oneName = oneName;
    }
    public String getTwoName() {
        return this.twoName;
    }
    public void setTwoName(String twoName) {
        this.twoName = twoName;
    }
    public String getThreeName() {
        return this.threeName;
    }
    public void setThreeName(String threeName) {
        this.threeName = threeName;
    }
    public String getFourName() {
        return this.fourName;
    }
    public void setFourName(String fourName) {
        this.fourName = fourName;
    }
    public String getOneId() {
        return this.oneId;
    }
    public void setOneId(String oneId) {
        this.oneId = oneId;
    }
    public String getTwoId() {
        return this.twoId;
    }
    public void setTwoId(String twoId) {
        this.twoId = twoId;
    }
    public String getThreeId() {
        return this.threeId;
    }
    public void setThreeId(String threeId) {
        this.threeId = threeId;
    }
    public String getShaoJing() {
        return this.shaoJing;
    }
    public void setShaoJing(String shaoJing) {
        this.shaoJing = shaoJing;
    }
    public int getQubie() {
        return this.qubie;
    }
    public void setQubie(int qubie) {
        this.qubie = qubie;
    }
    public String getNote() {
        return this.note;
    }
    public void setNote(String note) {
        this.note = note;
    }
    public String getLineName() {
        return this.lineName;
    }
    public void setLineName(String lineName) {
        this.lineName = lineName;
    }
    public Long getProjectId() {
        return this.projectId;
    }
    public void setProjectId(Long projectId) {
        this.projectId = projectId;
    }
    public String getModule_code() {
        return this.module_code;
    }
    public void setModule_code(String module_code) {
        this.module_code = module_code;
    }
    public String getModuleID() {
        return this.ModuleID;
    }
    public void setModuleID(String ModuleID) {
        this.ModuleID = ModuleID;
    }
    public String getModuleTxt() {
        return this.ModuleTxt;
    }
    public void setModuleTxt(String ModuleTxt) {
        this.ModuleTxt = ModuleTxt;
    }

    public String getFourId() {
        return this.fourId;
    }
    public void setFourId(String fourId) {
        this.fourId = fourId;
    }

    @Override
    public String toString() {
        return "Equipment{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", lever_id='" + lever_id + '\'' +
                ", head_id='" + head_id + '\'' +
                ", equipmentId='" + equipmentId + '\'' +
                ", lineId=" + lineId +
                ", pointId=" + pointId +
                ", amount=" + amount +
                ", oneName='" + oneName + '\'' +
                ", twoName='" + twoName + '\'' +
                ", threeName='" + threeName + '\'' +
                ", fourName='" + fourName + '\'' +
                ", fourId='" + fourId + '\'' +
                ", oneId='" + oneId + '\'' +
                ", twoId='" + twoId + '\'' +
                ", threeId='" + threeId + '\'' +
                ", shaoJing='" + shaoJing + '\'' +
                ", qubie=" + qubie +
                ", note='" + note + '\'' +
                ", lineName='" + lineName + '\'' +
                ", projectId=" + projectId +
                ", module_code='" + module_code + '\'' +
                ", ModuleID='" + ModuleID + '\'' +
                ", ModuleTxt='" + ModuleTxt + '\'' +
                '}';
    }
    public String getEqupmentNumber() {
        return this.equpmentNumber;
    }
    public void setEqupmentNumber(String equpmentNumber) {
        this.equpmentNumber = equpmentNumber;
    }
    public String getName_before() {
        return this.name_before;
    }
    public void setName_before(String name_before) {
        this.name_before = name_before;
    }
    public int getAngel() {
        return this.angel;
    }
    public void setAngel(int angel) {
        this.angel = angel;
    }
    public int getAngle_after() {
        return this.angle_after;
    }
    public void setAngle_after(int angle_after) {
        this.angle_after = angle_after;
    }
    public String getEqupmentIcon() {
        return this.equpmentIcon;
    }
    public void setEqupmentIcon(String equpmentIcon) {
        this.equpmentIcon = equpmentIcon;
    }
    public String getEqupmentIcon_before() {
        return this.equpmentIcon_before;
    }
    public void setEqupmentIcon_before(String equpmentIcon_before) {
        this.equpmentIcon_before = equpmentIcon_before;
    }
    public String getLever_id_before() {
        return this.lever_id_before;
    }
    public void setLever_id_before(String lever_id_before) {
        this.lever_id_before = lever_id_before;
    }
    public String getHead_id_before() {
        return this.head_id_before;
    }
    public void setHead_id_before(String head_id_before) {
        this.head_id_before = head_id_before;
    }
    public String getLineCid() {
        return this.lineCid;
    }
    public void setLineCid(String lineCid) {
        this.lineCid = lineCid;
    }
    public int getAmount_before() {
        return this.amount_before;
    }
    public void setAmount_before(int amount_before) {
        this.amount_before = amount_before;
    }
    public String getTowName_before() {
        return this.towName_before;
    }
    public void setTowName_before(String towName_before) {
        this.towName_before = towName_before;
    }
    public String getThreeName_before() {
        return this.threeName_before;
    }
    public void setThreeName_before(String threeName_before) {
        this.threeName_before = threeName_before;
    }
    public String getFourId_before() {
        return this.fourId_before;
    }
    public void setFourId_before(String fourId_before) {
        this.fourId_before = fourId_before;
    }
    public String getThreeId_before() {
        return this.threeId_before;
    }
    public void setThreeId_before(String threeId_before) {
        this.threeId_before = threeId_before;
    }
    public String getModule_code_before() {
        return this.module_code_before;
    }
    public void setModule_code_before(String module_code_before) {
        this.module_code_before = module_code_before;
    }
    public String getModuleID_before() {
        return this.ModuleID_before;
    }
    public void setModuleID_before(String ModuleID_before) {
        this.ModuleID_before = ModuleID_before;
    }
    public String getGetModuleTypeID() {
        return this.getModuleTypeID;
    }
    public void setGetModuleTypeID(String getModuleTypeID) {
        this.getModuleTypeID = getModuleTypeID;
    }
    public String getStatu() {
        return this.Statu;
    }
    public void setStatu(String Statu) {
        this.Statu = Statu;
    }
    public String getStatu_before() {
        return this.Statu_before;
    }
    public void setStatu_before(String Statu_before) {
        this.Statu_before = Statu_before;
    }
    public String getEqupmentNumber_after() {
        return this.equpmentNumber_after;
    }
    public void setEqupmentNumber_after(String equpmentNumber_after) {
        this.equpmentNumber_after = equpmentNumber_after;
    }
    public String getPoleHeight() {
        return this.poleHeight;
    }
    public void setPoleHeight(String poleHeight) {
        this.poleHeight = poleHeight;
    }
    public String getPoleHeight_before() {
        return this.poleHeight_before;
    }
    public void setPoleHeight_before(String poleHeight_before) {
        this.poleHeight_before = poleHeight_before;
    }
    public String getStrengthLevel() {
        return this.strengthLevel;
    }
    public void setStrengthLevel(String strengthLevel) {
        this.strengthLevel = strengthLevel;
    }
    public String getStrengthLevel_before() {
        return this.strengthLevel_before;
    }
    public void setStrengthLevel_before(String strengthLevel_before) {
        this.strengthLevel_before = strengthLevel_before;
    }
    public String getVoltageLevel() {
        return this.voltageLevel;
    }
    public void setVoltageLevel(String voltageLevel) {
        this.voltageLevel = voltageLevel;
    }
    public String getVoltageLevel_befo() {
        return this.voltageLevel_befo;
    }
    public void setVoltageLevel_befo(String voltageLevel_befo) {
        this.voltageLevel_befo = voltageLevel_befo;
    }
    public String getLoop() {
        return this.loop;
    }
    public void setLoop(String loop) {
        this.loop = loop;
    }
    public String getLoop_before() {
        return this.loop_before;
    }
    public void setLoop_before(String loop_before) {
        this.loop_before = loop_before;
    }
    public String getJdModleCode() {
        return this.JdModleCode;
    }
    public void setJdModleCode(String JdModleCode) {
        this.JdModleCode = JdModleCode;
    }
    public String getJdModleCode_before() {
        return this.JdModleCode_before;
    }
    public void setJdModleCode_before(String JdModleCode_before) {
        this.JdModleCode_before = JdModleCode_before;
    }
    public String getCapacitance() {
        return this.capacitance;
    }
    public void setCapacitance(String capacitance) {
        this.capacitance = capacitance;
    }
    public String getCapacitance_before() {
        return this.capacitance_before;
    }
    public void setCapacitance_before(String capacitance_before) {
        this.capacitance_before = capacitance_before;
    }
    public String getCompleteSet() {
        return this.completeSet;
    }
    public void setCompleteSet(String completeSet) {
        this.completeSet = completeSet;
    }
    public String getCompleteSet_before() {
        return this.completeSet_before;
    }
    public void setCompleteSet_before(String completeSet_before) {
        this.completeSet_before = completeSet_before;
    }
    public String getRodType() {
        return this.rodType;
    }
    public void setRodType(String rodType) {
        this.rodType = rodType;
    }
    public String getRodType_before() {
        return this.rodType_before;
    }
    public void setRodType_before(String rodType_before) {
        this.rodType_before = rodType_before;
    }
    public String getRodCategory() {
        return this.rodCategory;
    }
    public void setRodCategory(String rodCategory) {
        this.rodCategory = rodCategory;
    }
    public String getRodCategory_before() {
        return this.rodCategory_before;
    }
    public void setRodCategory_before(String rodCategory_before) {
        this.rodCategory_before = rodCategory_before;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeValue(this.id);
        dest.writeString(this.name);
        dest.writeString(this.name_before);
        dest.writeInt(this.angel);
        dest.writeInt(this.angle_after);
        dest.writeString(this.equpmentIcon);
        dest.writeString(this.equpmentIcon_before);
        dest.writeString(this.lever_id);
        dest.writeString(this.head_id);
        dest.writeString(this.lever_id_before);
        dest.writeString(this.head_id_before);
        dest.writeString(this.equipmentId);
        dest.writeValue(this.lineId);
        dest.writeString(this.lineCid);
        dest.writeValue(this.pointId);
        dest.writeInt(this.amount);
        dest.writeInt(this.amount_before);
        dest.writeString(this.oneName);
        dest.writeString(this.twoName);
        dest.writeString(this.towName_before);
        dest.writeString(this.threeName);
        dest.writeString(this.threeName_before);
        dest.writeString(this.fourName);
        dest.writeString(this.fourId);
        dest.writeString(this.fourId_before);
        dest.writeString(this.oneId);
        dest.writeString(this.twoId);
        dest.writeString(this.threeId);
        dest.writeString(this.threeId_before);
        dest.writeString(this.shaoJing);
        dest.writeInt(this.qubie);
        dest.writeString(this.note);
        dest.writeString(this.lineName);
        dest.writeValue(this.projectId);
        dest.writeString(this.module_code);
        dest.writeString(this.module_code_before);
        dest.writeString(this.ModuleID);
        dest.writeString(this.ModuleID_before);
        dest.writeString(this.getModuleTypeID);
        dest.writeString(this.ModuleTxt);
        dest.writeString(this.Statu);
        dest.writeString(this.Statu_before);
        dest.writeString(this.equpmentNumber);
        dest.writeString(this.equpmentNumber_after);
        dest.writeString(this.poleHeight);
        dest.writeString(this.poleHeight_before);
        dest.writeString(this.strengthLevel);
        dest.writeString(this.strengthLevel_before);
        dest.writeString(this.voltageLevel);
        dest.writeString(this.voltageLevel_befo);
        dest.writeString(this.loop);
        dest.writeString(this.loop_before);
        dest.writeString(this.JdModleCode);
        dest.writeString(this.JdModleCode_before);
        dest.writeString(this.capacitance);
        dest.writeString(this.capacitance_before);
        dest.writeString(this.completeSet);
        dest.writeString(this.completeSet_before);
        dest.writeString(this.rodType);
        dest.writeString(this.rodType_before);
        dest.writeString(this.rodCategory);
        dest.writeString(this.rodCategory_before);
    }

    protected Equipment(Parcel in) {
        this.id = (Long) in.readValue(Long.class.getClassLoader());
        this.name = in.readString();
        this.name_before = in.readString();
        this.angel = in.readInt();
        this.angle_after = in.readInt();
        this.equpmentIcon = in.readString();
        this.equpmentIcon_before = in.readString();
        this.lever_id = in.readString();
        this.head_id = in.readString();
        this.lever_id_before = in.readString();
        this.head_id_before = in.readString();
        this.equipmentId = in.readString();
        this.lineId = (Long) in.readValue(Long.class.getClassLoader());
        this.lineCid = in.readString();
        this.pointId = (Long) in.readValue(Long.class.getClassLoader());
        this.amount = in.readInt();
        this.amount_before = in.readInt();
        this.oneName = in.readString();
        this.twoName = in.readString();
        this.towName_before = in.readString();
        this.threeName = in.readString();
        this.threeName_before = in.readString();
        this.fourName = in.readString();
        this.fourId = in.readString();
        this.fourId_before = in.readString();
        this.oneId = in.readString();
        this.twoId = in.readString();
        this.threeId = in.readString();
        this.threeId_before = in.readString();
        this.shaoJing = in.readString();
        this.qubie = in.readInt();
        this.note = in.readString();
        this.lineName = in.readString();
        this.projectId = (Long) in.readValue(Long.class.getClassLoader());
        this.module_code = in.readString();
        this.module_code_before = in.readString();
        this.ModuleID = in.readString();
        this.ModuleID_before = in.readString();
        this.getModuleTypeID = in.readString();
        this.ModuleTxt = in.readString();
        this.Statu = in.readString();
        this.Statu_before = in.readString();
        this.equpmentNumber = in.readString();
        this.equpmentNumber_after = in.readString();
        this.poleHeight = in.readString();
        this.poleHeight_before = in.readString();
        this.strengthLevel = in.readString();
        this.strengthLevel_before = in.readString();
        this.voltageLevel = in.readString();
        this.voltageLevel_befo = in.readString();
        this.loop = in.readString();
        this.loop_before = in.readString();
        this.JdModleCode = in.readString();
        this.JdModleCode_before = in.readString();
        this.capacitance = in.readString();
        this.capacitance_before = in.readString();
        this.completeSet = in.readString();
        this.completeSet_before = in.readString();
        this.rodType = in.readString();
        this.rodType_before = in.readString();
        this.rodCategory = in.readString();
        this.rodCategory_before = in.readString();
    }

    public static final Parcelable.Creator<Equipment> CREATOR = new Parcelable.Creator<Equipment>() {
        @Override
        public Equipment createFromParcel(Parcel source) {
            return new Equipment(source);
        }

        @Override
        public Equipment[] newArray(int size) {
            return new Equipment[size];
        }
    };
}
